class Solution
{
public:
    vector<string> findHighAccessEmployees(vector<vector<string>> &access_times)
    {
        unordered_map<string, vector<int>> m;
        for (auto &access : access_times)
        {
            int time = stoi(access[1].substr(0, 2)) * 60 + stoi(access[1].substr(2, 2));
            m[access[0]].push_back(time);
        }
        vector<string> result;
        for (auto &[name, times] : m)
        {
            sort(times.begin(), times.end());
            for (int i = 2; i < times.size(); i++)
            {
                if (times[i] - times[i - 2] < 60)
                {
                    result.push_back(name);
                    break;
                }
            }
        }
        return result;
    }
};